package server.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import server.business.pojo.BloodOrderData;
import server.business.vo.Result;
import server.business.vo.ResultExpand;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface BloodOrderService extends IService<BloodOrderData> {
    IPage<BloodOrderData> selectByPage(int currentPage, int limit);

    ResultExpand listByPage(HttpServletRequest request, HttpServletResponse response);

    List<BloodOrderData> queryData();

    ResultExpand searchBloodOrder(HttpServletRequest request, HttpServletResponse response);

    Result modifyBloodOrder(@RequestBody BloodOrderData bloodOrderData);

    Result refuseBloodOrder(@RequestBody BloodOrderData bloodOrderData);

    Result passBloodOrder(@RequestBody BloodOrderData bloodOrderData);

    Result submitOrder(@RequestBody BloodOrderData[] bloodOrderList, @RequestParam(name = "applicant") String applicant, @RequestParam(name = "applicantNumber") String applicantNumber, @RequestParam(name = "applyCompany") String applyCompany);

    Result deleteBloodOrder(@RequestBody BloodOrderData bloodOrderData);

    void downloadExcel(HttpServletRequest request, HttpServletResponse response);
}
